package com.jctrip.hotel.management.model.result;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ApiModel(value = "查询价格-返回值")
@Data
@Builder
public class GetSearchPriceResult {
    @ApiModelProperty(value = "日期列表")
    List<DateInfo> dateInfoList;

    @ApiModelProperty(value = "价格列表")
    List<PriceInfo> priceInfoList;

    @ApiModel(value = "日期对象")
    @Data
    @Builder
    public static class DateInfo{
        @ApiModelProperty(value = "主键id")
        private Long id;

        @ApiModelProperty(value = "日期")
        private String calDate;
    }

    @ApiModel(value = "价格对象")
    @Data
    @Builder
    public static class PriceInfo{
        @ApiModelProperty(value = "主键id")
        private Long id;

        @ApiModelProperty(value = "价格政策对外编号")
        private String pricePolicyCode;

        @ApiModelProperty(value = "价格政策名")
        private String pricePolicyName;

        @ApiModelProperty(value = "采购价")
        private BigDecimal totalPrice;

        @ApiModelProperty(value = "每日价格列表")
        List<PriceDetailInfo> priceDetailInfos;
    }

    @ApiModel(value = "每日价格对象")
    @Data
    @Builder
    public static class PriceDetailInfo{
        @ApiModelProperty(value = "主键id")
        private Long id;

        @ApiModelProperty(value = "日期")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date calDate;

        @ApiModelProperty(value = "采购价")
        private BigDecimal purchasePrice;

        @ApiModelProperty(value = "早餐份额")
        private Integer breakfastCount;

        @ApiModelProperty(value = "库存")
        private Integer stock;
    }
}
